<?php
/**
 * By extending the Zend_Form class it is possible to create a
 * new form class with automatic CSRF protection
 *
 * @category Core
 * @package  Core_Form
 *
 * @version $Id: Form.php 87 2010-08-29 10:15:50Z vadim.leontiev $
 */

class Core_Form extends Zend_Form
{
    /**
     * Constructor
     * Call parent constructor and add hash form element
     *
     * @param aray $options [optional]
     */
    public function __construct($options = null)
    {
        parent::__construct($options);

        $this->addElement('hash', 'csrf',
            array('salt' => get_class($this)));
    }
}
